package com.capgemini.teamtwo.common;

import lombok.Getter;

public class BusinessException extends RuntimeException {

    @Getter
    private int code;

    @Getter
    private String message;

    @Getter
    private Object errorData;

    public BusinessException(ExceptionEnum exceptionEnum) {
        this.code = exceptionEnum.getCode();
        this.message = exceptionEnum.getMessage();
    }

    public BusinessException(ExceptionEnum exceptionEnum, Object errorData) {
        this.code = exceptionEnum.getCode();
        this.message = exceptionEnum.getMessage();
        this.errorData = errorData;

    }


}
